package com.boot.security.server.utils.mffl.WecahtPayUtil;

import com.boot.security.server.dto.LoginUser;
import com.boot.security.server.utils.mffl.ProjectUtil;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Primary;
import org.springframework.data.redis.core.RedisTemplate;
import org.springframework.stereotype.Service;

import java.math.BigDecimal;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.concurrent.TimeUnit;

/**
 * 支付配置类
 * @author David Ge
 * @version 创建时间：2019年7月4日 下午1:47:06
 */

public class WxpayParam {

	/*微信支付金额是String 类型 并且是以分为单位*/
	private String body = "xxx等商品信息";
	private String notify_url;
	private String spbill_create_ip;
	private String total_fee;
    private String payMerchantNumber;
    private String nonce_str;
    private String attach;

    public String getNonce_str() {
        return nonce_str;
    }
    public void setNonce_str(String nonce_str) {
        this.nonce_str = nonce_str;
    }
    public String getPayMerchantNumber() {
        return payMerchantNumber;
    }

    public void setPayMerchantNumber(String payMerchantNumber) {
        this.payMerchantNumber = payMerchantNumber;
    }

    public String getTotalPrice(){
        BigDecimal totalPrice = new BigDecimal(total_fee);//此时的单元是元
         return totalPrice.multiply(new BigDecimal(100)).toBigInteger().toString();
    }

	public String getAttach() {
		return attach;
	}

	public void setAttach(String attach) {
		this.attach = attach;
	}

	public String getNotify_url() {
		return notify_url;
	}

	public void setNotify_url(String notify_url) {
		this.notify_url = notify_url;
	}

	public String getSpbill_create_ip() {
		return spbill_create_ip;
	}

	public void setSpbill_create_ip(String spbill_create_ip) {
		this.spbill_create_ip = spbill_create_ip;
	}

	public void setTotal_fee(String total_fee) {
		this.total_fee = total_fee;
	}

	public String getBody() {
		return body;
	}

	public void setBody(String body) {
		this.body = body;
	}

	
}
